#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int count_bit_1(int x);
int main()
{
	int input = 0;
	scanf("%d", &input);
	int ret = count_bit_1(input);
	printf("%d", ret);
	return 0;
}
int count_bit_1(int num)
{
	int count = 0;
	while (num)
	{
		num = num & (num - 1);
		count++;
	}
	return count;
}